/*
bea_u951.h
offer bea u951 lidar data type define and function api
designed by lunanting

----------------------------
2020-11-06 18:53:04
create file
----------------------------
*/
#ifndef __BEA_U951_H
#define __BEA_U951_H

#include "../../bsp/base_type.h"
#include "../../../include/aos/hal/uart.h"

#define BEA_dir 0


/**********************data type define*****************************/


//bea class
typedef struct{
    u8 init;    //obj init status
    u8 port;    //uart port
    u32 speed;  //uart speed
    uart_dev_t uart;    //uart obj
    int dis_min;    //min dis
    int hight_max;  //max hight
    u8 data[250];   //rec data
    u32 rec_len;    //rec length
    u8 online;      //online status
    u16 offset;     //offset use point
    u16 use_len;    //user point number
}BEA_class;



/*********************************function extern************************/
extern int xp_bea_init(BEA_class *bea,u8 port,u32 speed);   //init lidar
extern int xp_beaU951_debug(char *type,char *fun,char *param);  //debug

#endif
//end of the file
